package com.brightworks.scripthelper.analyzers
{
    import com.brightworks.scripthelper.constants.LineTypeConstants;
    import com.brightworks.util.Log;
    import com.brightworks.util.Utils_String;

    public class LineTypeAnalyzer_Chunk_NativeLanguage extends LineTypeAnalyzer
    {
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
        //
        //          Getters & Setters
        //
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
        
        public static function get lineTypeDescription():String
        {
            return LineTypeConstants.LINE_TYPE_DESCRIPTION__CHUNK__NATIVE_LANGUAGE;
        }
        
        public static function get lineTypeId():String
        {
            return LineTypeConstants.LINE_TYPE_ID__CHUNK__NATIVE_LANGUAGE;
        }
        
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
        //
        //          Public Methods
        //
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
        
        public function LineTypeAnalyzer_Chunk_NativeLanguage()
        {
            super();
            bIsChunkLine = true;
        }
        
        override public function getProblemReports():Array
        {
            var problemList:Array = [];
            if (!Utils_String.doesStringEndWithString(lineText, [".", "?", "!", "...", ".)", '."', "!)", '!"', "?)", '?"', ".”", "?”", "!”", ')"', ")”", '")', "”)", ":"]))
                problemList.push("Based on its position in its chunk, this line should be a " + LineTypeConstants.LINE_TYPE_DESCRIPTION__CHUNK__NATIVE_LANGUAGE + ". These lines should usually end with either a period, a question mark or an exclamation mark, or else should end with an ellipsis. This line doesn't end with any of these things.");
            return constructFullProblemStrings(problemList);
        }
        
        public static function isLineThisType(lineString:String, lineStringList:Array=null, lineNum:int=-1):Boolean
        {   
            // We use another, external, method to determine this at this point, so this method isn't used.
            Log.fatal("LineTypeAnalyzer_Chunk_NativeLanguage.isLineThisType(): Method not implemented");
            return false;
        }

        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
        //
        //          Private Methods
        //
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
        
    }
}